#!/usr/bin/env bash

# 项目名
PROJECT_NAME=fast-mpg
# http端口，需要修改
HTTP_PORT=8080

mvn clean package -Dmaven.test.skip

docker build \
  --no-cache \
  -f docker/Dockerfile \
  -t ${PROJECT_NAME} \
  --build-arg projectName=${PROJECT_NAME} \
  . &&
  docker run -it --rm\
    -p $HTTP_PORT:$HTTP_PORT \
    --name ${PROJECT_NAME}-service\
    $PROJECT_NAME
